package 场景.瞬间高并发请求.redis;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import redis.clients.jedis.Jedis;
import util.RedisPoolFactory;

public class Seckill {
    private Jedis redis = RedisPoolFactory.getJedis();

    static final int MAX_THREAD = 1000;

    static CountDownLatch latch = new CountDownLatch(MAX_THREAD);

    public static void main(String[] args) {
	/*	 ExecutorService executor = Executors.newFixedThreadPool(MAX_THREAD);
		 for(int i=0;i<MAX_THREAD;i++){
	    	 final int id=i;
	    	// Runnable run=()->doWork(id);//都是调用doWork方法
	    	 executor.submit(run);
	    	 latch.countDown();
	     }
	     
	     executor.shutdown();
	     while (true) {
			if(executor.isTerminated()){
				break;
			}
		}*/
    }
}
